package com.information.service;

import com.information.entity.User;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;
import java.util.Optional;

public interface UserService {
    List<User> findAllUsers();
    Optional<User> findUserById(Long id);
    Optional<User> findUserByUsername(String username);
    User saveUser(User user, String operatedBy);
    User updateUser(Long id, User userDetails, String operatedBy);
    void deleteUser(Long id, String operatedBy);
    boolean existsByUsername(String username);
    Optional<User> login(String username, String password);
    User updateUserStatus(Long id, String status, String operatedBy);
    boolean canOperateOnUser(Long operatorId, String operatorRole, Long targetUserId);
    // 添加Excel导入方法
    Map<String, Integer> importUsersFromExcel(MultipartFile file, String operatedBy) throws Exception;
    // 添加回收站相关方法
    List<User> findDeletedUsers();
    User restoreUser(Long id, String operatedBy);
    void permanentDeleteUser(Long id, String operatedBy);
    int clearRecycleBin(String operatedBy);
}